home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / KonquerorIface.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-01-19  |  6.5 KB  |  190 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
  3.    Copyright (C) 2000 David Faure <faure@kde.org>
  4.  
  5.    This program is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU General Public
  7.    License as published by the Free Software Foundation; either
  8.    version 2 of the License, or (at your option) any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.     General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; see the file COPYING.  If not, write to
  17.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18.    Boston, MA 02110-1301, USA.
  19. */
  20.  
  21. #ifndef __KonquerorIface_h__
  22. #define __KonquerorIface_h__
  23.  
  24. #include <dcopobject.h>
  25. #include <qvaluelist.h>
  26. #include <dcopref.h>
  27.  
  28. #include <qstringlist.h>
  29. /**
  30.  * DCOP interface for konqueror
  31.  */
  32. class KonquerorIface : virtual public DCOPObject
  33. {
  34.   K_DCOP
  35. public:
  36.  
  37.   KonquerorIface();
  38.   ~KonquerorIface();
  39.  
  40. k_dcop:
  41.  
  42.   /**
  43.    * Opens a new window for the given @p url (using createSimpleWindow, i.e. a single view)
  44.    */
  45.   DCOPRef openBrowserWindow( const QString &url );
  46.   /**
  47.    * Like @ref openBrowserWindow , with setting the application startup notification ( ASN )
  48.    * property on the window.
  49.    */
  50.   DCOPRef openBrowserWindowASN( const QString &url, const QCString &startup_id );
  51.  
  52.   /**
  53.    * Opens a new window for the given @p url (using createNewWindow, i.e. with an appropriate profile)
  54.    */
  55.   DCOPRef createNewWindow( const QString &url );
  56.   /**
  57.    * Like @ref createNewWindow , with setting the application startup notification ( ASN )
  58.    * property on the window.
  59.    */
  60.   DCOPRef createNewWindowASN( const QString &url, const QCString &startup_id, bool tempFile );
  61.  
  62.   /**
  63.    * Opens a new window like @ref createNewWindow, then selects the given @p filesToSelect
  64.    */
  65.   DCOPRef createNewWindowWithSelection( const QString &url, QStringList filesToSelect );
  66.   /**
  67.    * Like @ref createNewWindowWithSelection, with setting the application startup notification ( ASN )
  68.    * property on the window.
  69.    */
  70.   DCOPRef createNewWindowWithSelectionASN( const QString &url, QStringList filesToSelect, const QCString &startup_id );
  71.  
  72.   /**
  73.    * Opens a new window for the given @p url (using createNewWindow, i.e. with an appropriate profile)
  74.    * @param mimetype to speed it up.
  75.    */
  76.   DCOPRef createNewWindow( const QString &url, const QString & mimetype, bool tempFile );
  77.   /**
  78.    * Like @ref createNewWindow , with setting the application startup notification ( ASN )
  79.    * property on the window.
  80.    */
  81.   DCOPRef createNewWindowASN( const QString &url, const QString & mimetype,
  82.       const QCString &startup_id, bool tempFile );
  83.  
  84.   /**
  85.    * As the name says, this creates a window from a profile.
  86.    * Used for instance by khelpcenter.
  87.    */
  88.   DCOPRef createBrowserWindowFromProfile( const QString &path );
  89.   /**
  90.    * Like @ref createBrowserWindowFromProfile , with setting the application startup
  91.    * notification ( ASN ) property on the window.
  92.    */
  93.   DCOPRef createBrowserWindowFromProfileASN( const QString &path, const QCString &startup_id );
  94.  
  95.   /**
  96.    * As the name says, this creates a window from a profile.
  97.    * Used for instance by kfmclient.
  98.    * @param path full path to the profile file
  99.    * @param filename name of the profile file, if under the profiles dir
  100.    */
  101.   DCOPRef createBrowserWindowFromProfile( const QString &path, const QString &filename );
  102.   /**
  103.    * Like @ref createBrowserWindowFromProfile , with setting the application startup
  104.    * notification ( ASN ) property on the window.
  105.    */
  106.   DCOPRef createBrowserWindowFromProfileASN( const QString &path, const QString &filename,
  107.       const QCString &startup_id );
  108.  
  109.   /**
  110.    * Creates a window from a profile and a URL.
  111.    * Used by kfmclient to open http URLs with the webbrowsing profile
  112.    * and others with the filemanagement profile.
  113.    * @param path full path to the profile file
  114.    * @param filename name of the profile file, if under the profiles dir
  115.    * @param url the URL to open
  116.    */
  117.   DCOPRef createBrowserWindowFromProfileAndURL( const QString &path, const QString &filename, const QString &url );
  118.   /**
  119.    * Like @ref createBrowserWindowFromProfileAndURL , with setting the application startup
  120.    * notification ( ASN ) property on the window.
  121.    */
  122.   DCOPRef createBrowserWindowFromProfileAndURLASN( const QString &path, const QString &filename, const QString &url,
  123.       const QCString &startup_id );
  124.  
  125.   /**
  126.    * Creates a window the fastest way : the caller has to provide
  127.    * profile, URL, and mimetype.
  128.    * @param path full path to the profile file
  129.    * @param filename name of the profile file, if under the profiles dir
  130.    * @param url the URL to open
  131.    * @param mimetype the mimetype that the URL we want to open has
  132.    */
  133.   DCOPRef createBrowserWindowFromProfileAndURL( const QString &path, const QString &filename, const QString &url, const QString &mimetype );
  134.   /**
  135.    * Like @ref createBrowserWindowFromProfileAndURL , with setting the application startup
  136.    * notification ( ASN ) property on the window.
  137.    */
  138.   DCOPRef createBrowserWindowFromProfileAndURLASN( const QString &path, const QString &filename, const QString &url, const QString &mimetype,
  139.       const QCString& startup_id );
  140.  
  141.   /**
  142.    * Called by kcontrol when the global configuration changes
  143.    */
  144.   ASYNC reparseConfiguration();
  145.  
  146.   /**
  147.    * @return the name of the instance's crash log file
  148.    */
  149.   QString crashLogFile();
  150.  
  151.   /**
  152.    * @return a list of references to all the windows
  153.    */
  154.   QValueList<DCOPRef> getWindows();
  155.  
  156.   /**
  157.    *  Called internally as broadcast when the user adds/removes/renames a view profile
  158.     */
  159.   ASYNC updateProfileList();
  160.  
  161.   /**
  162.    * Called internally as broadcast when a URL is to be added to the combobox.
  163.    */
  164.   ASYNC addToCombo( QString, QCString );
  165.  
  166.   /**
  167.    * Called internall as broadcast when a URL has to be removed from the combo.
  168.    */
  169.   ASYNC removeFromCombo( QString, QCString );
  170.  
  171.   /**
  172.    * Called internally as a broadcast when the combobox was cleared.
  173.    */
  174.   ASYNC comboCleared( QCString );
  175.  
  176.   /**
  177.    * Used by kfmclient when the 'minimize memory usage' setting is set
  178.    * to find out if this konqueror can be used.
  179.    */
  180.   bool processCanBeReused( int screen );
  181.  
  182.   /**
  183.    * Called from konqy_preloader to terminate this Konqueror instance,
  184.    * if it's in the preloaded mode, and there are too many preloaded Konqy's
  185.    */
  186.   ASYNC terminatePreloaded();
  187. };
  188.  
  189. #endif
  190.